<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <ui:composition template="/templates/default.xhtml">
            <ui:define name="content">
                <h:outputText value="#{locale.codeMetaEmpty}" rendered="#{courseSearch.isMetaCoursesEmpty()}"/>
                <h:outputText value="#{locale.codeSearchStringEmpty}" rendered="#{courseSearch.isSearchStringEmpty()}"/>

                <h:outputText value="#{locale.codeSorted}" rendered="#{not courseSearch.isCoursesSortedEmpty()}"/>
                <h:dataTable value="#{courseSearch.courseCodeSorted}" var="c" rendered="#{not courseSearch.isCodeSortedEmpty()}">
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseID}
                        </f:facet>
                        <h:outputText value="#{c.courseID}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseCode}
                        </f:facet>
                        <h:outputText value="#{c.courseCode}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseName}
                        </f:facet>
                        <h:outputText value="#{c.courseName}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseLevel}
                        </f:facet>
                        <h:outputText value="#{c.courseLevel}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseContent}
                        </f:facet>
                        <h:outputText value="#{c.courseContent}" />
                    </h:column>
                </h:dataTable>
                <p/>
                <h:outputText value="#{locale.nameSorted}" rendered="#{not courseSearch.isNameSortedEmpty()}"/>
                <h:dataTable value="#{courseSearch.courseNameSorted}" var="c" rendered="#{not courseSearch.isNameSortedEmpty()}">
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseID}
                        </f:facet>
                        <h:outputText value="#{c.courseID}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseCode}
                        </f:facet>
                        <h:outputText value="#{c.courseCode}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseName}
                        </f:facet>
                        <h:outputText value="#{c.courseName}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseLevel}
                        </f:facet>
                        <h:outputText value="#{c.courseLevel}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseContent}
                        </f:facet>
                        <h:outputText value="#{c.courseContent}" />
                    </h:column>
                </h:dataTable>
                <p/>
                <h:outputText value="#{locale.contentSorted}" rendered="#{not courseSearch.isContentSortedEmpty()}"/>
                <h:dataTable value="#{courseSearch.courseContentSorted}" var="c" rendered="#{not courseSearch.isContentSortedEmpty()}">
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseID}
                        </f:facet>
                        <h:outputText value="#{c.courseID}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseCode}
                        </f:facet>
                        <h:outputText value="#{c.courseCode}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseName}
                        </f:facet>
                        <h:outputText value="#{c.courseName}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseLevel}
                        </f:facet>
                        <h:outputText value="#{c.courseLevel}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            #{locale.dtHeaderCourseContent}
                        </f:facet>
                        <h:outputText value="#{c.courseContent}" />
                    </h:column>
                </h:dataTable>

            </ui:define>
        </ui:composition>
    </h:body>
</html>

